home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 10 / AACD 10.iso / AACD / Magazine / Morphos / GCC / lib / gcc-lib / ppc-amigaos / 2.95.1 / include / exception next >
Text File  |  2000-03-13  |  808b  |  40 lines

  1. // Exception Handling support header for -*- C++ -*-
  2. // Copyright (C) 1995, 96-97, 1998 Free Software Foundation
  3.  
  4. #ifndef __EXCEPTION__
  5. #define __EXCEPTION__
  6.  
  7. #pragma interface "exception"
  8.  
  9. extern "C++" {
  10.  
  11. namespace std {
  12.  
  13. class exception {
  14. public:
  15.   exception () { }
  16.   virtual ~exception () { }
  17.   virtual const char* what () const;
  18. };
  19.  
  20. class bad_exception : public exception {
  21. public:
  22.   bad_exception () { }
  23.   virtual ~bad_exception () { }
  24. };
  25.  
  26. typedef void (*terminate_handler) ();
  27. typedef void (*unexpected_handler) ();
  28.  
  29. terminate_handler set_terminate (terminate_handler);
  30. void terminate () __attribute__ ((__noreturn__));
  31. unexpected_handler set_unexpected (unexpected_handler);
  32. void unexpected () __attribute__ ((__noreturn__));
  33. bool uncaught_exception ();
  34.  
  35. } // namespace std
  36.  
  37. } // extern "C++"
  38.  
  39. #endif
  40.